#ifndef __APP_HANDLE_H_
#define __APP_HANDLE_H_

#include "app_light_control.h"

#define TASK_LOOP_FLAG      0x8000
#define RESET_GIVE_FLAG     0x4000
#define GRADUAL_CNT_BIT     0x3FFF

#define DEFAULT_UINT_MAX    20
#define HANLD_CYCLE_MS      10

typedef struct
{
    SHADE_PARAM_E shade_param; ///< What param of light to be shade
    UINT16_T steps_cnt;
    UINT16_T steps_max;
    LIGHT_DATA_T original_val; // Original CW output
    LIGHT_DATA_T target_val;   // Target CW output
    LIGHT_DATA_T current_val;  // Current CW output
} light_ctrl_handle_t;

VOID_T app_light_ctrl_running_cb(TIMER_ID timer_id, VOID_T *arg);
VOID_T app_handle_init(VOID_T);
VOID_T app_handle_start(UINT8_T save_flag);
OPERATE_RET app_light_ctrl_handle_data_get(LIGHT_DATA_T *cur_data);
#endif

